package cn.emove.modular.system.service;


import cn.emove.core.common.page.LayuiPageFactory;
import cn.emove.modular.system.entity.MeterReading;
import cn.emove.modular.system.mapper.MeterTemplateMapper;
import cn.emove.modular.system.model.MeterReadingDto;
import cn.stylefeng.roses.core.datascope.DataScope;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class MeterTemplateService extends ServiceImpl<MeterTemplateMapper, MeterReading> {
    public Page<Map<String, Object>> selectMeterTemplates(DataScope dataScope,String monthTime, String meterModel) {
        Page page = LayuiPageFactory.defaultPage();
        return this.baseMapper.selectMeterTemplates(page,dataScope,monthTime,meterModel);
    }

    public List<MeterReadingDto> selectAllMeterTemplates(String monthTime, String[] array, String meterModel) {
        return this.baseMapper.selectAllMeterTemplates(monthTime,array,meterModel);
    }
}
